<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script src="./base64.js"></script>
    <script>
        function b64EncodeUnicode(str) {
            return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
                return String.fromCharCode('0x' + p1);
            }));
        }

        console.log(b64EncodeUnicode("hello world"));
        //此库和rsa加密库冲突
        console.log(Base64.encode("hello world"));
        console.log(Base64.decode(Base64.encode("123")));
        console.log(Base64._utf8_encode("hello world"));
        console.log(Base64._utf8_decode(Base64._utf8_encode("hello world")));


    </script>
    
</body>
</html>